<template>
  <div>
    <h2>我是子组件</h2>

    <h2>我是子组件的数据{{ count }}</h2>

    <!-- <button @click="updateCount(999)">修改count的值</button> -->

    <button @click="count++">点击修改count</button>
  </div>
</template>
<script setup>
import { inject } from 'vue'

const count = inject('count')

console.log(count)

// const updateCount = inject('updateCount')
</script>
<style lang="less"></style>
